package com.trkj.dao.jpa;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.Tbstaff;

public interface IYzrTbstaffDAO extends CrudRepository<Tbstaff, Long> {
	@Query("select c from Tbstaff c where c.departmentNo=?1")
	public List<Tbstaff> findBydepartmentNo(BigDecimal departmentNo);
	
	@Query("select c from Tbstaff c where c.staffName=?1")
	public Tbstaff findByStaffName(String name);
	@Query("select c from Tbstaff c where c.staffName=?1")
	public List<Tbstaff> queryByStaffName(String name);
	//findBystaffPostNo
	@Query("select c from Tbstaff c where c.staffPostNo=?1")
	public List<Tbstaff> findBystaffPostNo(BigDecimal staffPostNo);
	
	@Query("select c from Tbstaff c where c.departmentNo=1361")
	public List<Tbstaff> findAllStaff();
	
}
